jQuery.noConflict(); jQuery(document).ready(function($){ RwGet = { pathto: function(path, file) { var rtrim = function(str, list) { var charlist = !list ? 's\xA0': (list + '').replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '$1'); var re = new RegExp('[' + charlist + ']+$', 'g'); return (str + '').replace(re, ''); }; var jspathto = rtrim(RwSet.pathto, "javascript.js"); if ((path !== undefined) && (file !== undefined)) { jspathto = jspathto + path + file; } else if (path !== undefined) { jspathto = jspathto + path; } return jspathto; }, baseurl: function(path, file) { var jsbaseurl = RwSet.baseurl; if ((path !== undefined) && (file !== undefined)) { jsbaseurl = jsbaseurl + path + file; } else if (path !== undefined) { jsbaseurl = jsbaseurl + path; } return jsbaseurl; } }; // Navigation $('nav ul').removeClass('nojs'); $('nav li').hover(function() { $(this).find('ul:first').stop('true','true').animate({opacity: 'toggle', height: 'toggle'}, + dropSpeed);}); $('nav li li:first-child').each(function(){$(this).find('a:first').addClass( 'first_item' );}); $('nav li li:last-child').each(function(){$(this).find('a:first').addClass( 'last_item' );}); // Extra Content var extraContent = (function() { var ecValue = 10; for (i=1;i<=ecValue;i++) { $('#myExtraContent'+i+' script').remove(); $('#myExtraContent'+i).appendTo('#extraContainer'+i); } })(); // B Stealth Specific Formatting $('#asideTitle:empty, .filesharing-description:empty, .message-text:empty, .movie-page-title:empty, .movie-page-description:empty').remove(); $('footer li:last-child, .filesharing-item:last-child, .blog-entry:last').each(function(){$(this).addClass( 'last_item' );}); var today = new Date() var month = today.getMonth()+1 var year = today.getYear() var day = today.getDate() if(day<10) day = "0" + day if(month<10) month= "0" + month if(year<1000) year+=1900 if ($('#jsDate').css('z-index') == '1'){$('#jsDate').html(month + "." + day + "." + (year+"").substring(2,4))} else if($('#jsDate').css('z-index') == '2'){$('#jsDate').html(day + "." + month + "." + (year+"").substring(2,4))} else if($('#jsDate').css('z-index') == '3'){$('#jsDate').html((year+"").substring(2,4) + "." + month + "." + day)} // $thumbCount = parseInt($('#jsDate').css("top")); // Lightbox Photo Album var sdLightboxAlbums = (function() { // test if either album is true if ($('.album-wrapper').length || $('.movie-thumbnail-frame').length) { // load js (prettyPhoto) $.getScript(RwGet.pathto('scripts/jquery.prettyPhoto.js'), function() { // once script is loaded // test if photo album is true if ($('.album-wrapper').length) { // get thumbnail links and alter attributes $('.thumbnail-frame').each(function() { var thisAnch = $('a', this); var thisImg = $('a img', this); var thisCap = $('.thumbnail-caption', this); thisAnch.attr({ 'href': thisImg.attr('src').replace(/thumb/i, 'full'), 'rel': 'prettyPhoto[gallery]', 'title': thisCap.text() }); }); } // apply effects (prettyPhoto) $('a[rel^=prettyPhoto]').prettyPhoto({ animation_speed: 'fast', show_title: false, theme: 'light_square' }); }); } })(); });