jQuery(document).ready(function(){
jQuery('#ads').cycle({ 
fx: 'fade', 
speed: 1000,
timeout: 8000,
random: 1,
pause: 1
});
});

jQuery(document).ready(function(){
jQuery('#sliderContent').cycle({ 
fx:     'scrollHorz', 
speed:   500, 
timeout: 16000, 
next:   '#next2', 
prev:   '#prev2',
random: 1,
pause: 1

});
});


jQuery(document).ready(function() {
jQuery(".sidebox h4 a:eq(0)").hover(
function () {
jQuery(this).append(
jQuery("<span class='tip'>(View all events)</span>"));
}, 
function () {
jQuery(this).find("span:last").remove();
});
});

//jQuery(document).ready(function() {
//jQuery(".tabsrecbox dl:nth-child(4n)").css({ "margin-right": "0" });
//});

jQuery(document).ready(function() {
jQuery("#fashion .item:nth-child(2n)").css({ "border-right": "0" });
});

//jQuery(document).ready(function() {
//jQuery("#tab-music dl:gt(3)").hide();
//});

//jQuery(document).ready(function() {
//jQuery("#tab-movies dl:gt(3)").hide();
//});

//jQuery(document).ready(function() {
//jQuery("#tab-books dl:gt(3)").hide();
//});


//jQuery(document).ready(function() {
//jQuery(".single .image:eq(0)").hide();
//});

//jQuery(document).ready(function() {
//jQuery("#tunein.single .image:eq(0)").show();
//});

//jQuery(document).ready(function() {
//jQuery("#bookit.single .image:eq(0)").show();
//});

//jQuery(document).ready(function() {
//jQuery("#snaps.single .image:eq(0)").show();
//});

//jQuery(document).ready(function() {
//jQuery("#dishes.single .image:eq(0)").show();
//});


//jQuery(document).ready(function() {
//jQuery(".category .image").hide();
//});

//jQuery(document).ready(function() {
//jQuery("#tunein.category .image").show();
//});


jQuery(document).ready(function() {
jQuery("a[rel*=lightbox]").lightBox(); 
});

jQuery(document).ready(function() {
jQuery("a[rel*=cover]").lightBox(); 
});


jQuery(document).ready(function() {
jQuery("a.main-zoom").lightBox(); 
});

jQuery(document).ready(function() {
jQuery("#cover .thumb a").lightBox(); 
});


jQuery(document).ready(function() {
jQuery(".gallery a").lightBox(); 
});

jQuery(document).ready(function() {
jQuery("#faves .image a").lightBox(); 
});

jQuery(document).ready(function() {
jQuery("#fashion .item a").lightBox(); 
});

//jQuery(window).load(function (){
//jQuery('.boxgrid img:eq(0)').css('width','400px');
//});






//jQuery(document).ready(function() {
//jQuery(".tabbox").tabs({
//	fxFade: true,
//    fxSpeed: "fast"
//    });
//});

//jQuery(document).ready(function() {
//jQuery("#container-1").tabs({
//	fxFade: true,
//    fxSpeed: "fast"
//    });
//});

	jQuery(function() {
		jQuery("#tabs").tabs();
	});
	
		jQuery(function() {
		jQuery(".tabsbox").tabs({ fx: { opacity: 'toggle', duration:'fast' } });
	});
	
jQuery(function() {
jQuery("#sidebar3").tabs({ fx: { opacity: 'toggle', duration:'fast' } });
	});
	
	jQuery(function() {
jQuery("#nav2").tabs();
	});


jQuery(document).ready(function(){
jQuery("input, textarea").focus(function () {
jQuery(this).addClass("ele");
});
jQuery("input, textarea").blur(function () {
jQuery(this).removeClass("ele");
});
});




jQuery(document).ready(function(){
jQuery(".submit-button").hover(
      function () {
        jQuery(this).addClass("btn-over");
      }, 
      function () {
        jQuery(this).removeClass("btn-over");
});

});






jQuery(document).ready(function(){
	jQuery("#slickbox, span.hide").hide();
    jQuery("a#slick-toggle").click(function (event) {
    jQuery("#slickbox").slideToggle();
    jQuery("span.show").toggle();
    jQuery("span.hide").toggle();
        return false;
    });
});

//jQuery(document).ready(function(){
//jQuery(".home-features .entry").click(function(){
//    	window.location=jQuery(this).find("a").attr("href");return false;
//	});
//jQuery(".home-features .entry").css({"cursor":"pointer"});
//});

jQuery(document).ready(function(){
   var block = jQuery(".tabsrecbox");
   block.click(function(){
      window.location = jQuery(this).find("a:first").attr("href")
   });
   block.addClass("clickable");
   block.hover(function(){
      window.status = jQuery(this).find("a:first").attr("href")
   }, function(){
      window.status = ""
   })
});

jQuery(document).ready(function(){
   var block = jQuery(".home-features .entry");
   block.click(function(){
      window.location = jQuery(this).find("a:first").attr("href")
   });
   block.addClass("clickable");
   block.hover(function(){
      window.status = jQuery(this).find("a:first").attr("href")
   }, function(){
      window.status = ""
   })
});

//jQuery(document).ready(function(){
//   var block = jQuery("#suggests .entrybody dl");
//   block.click(function(){
//      window.location = jQuery(this).find("a:first").attr("href")
//   });
//   block.addClass("clickable");
//   block.hover(function(){
//      window.status = jQuery(this).find("a:first").attr("href")
//   }, function(){
//      window.status = ""
//   })
//});



jQuery(document).ready(function(){
jQuery(".block-sm").click(function(){
    	window.location=jQuery(this).find("a").attr("href");return false;
    	
	});
jQuery(".block-sm").css({"cursor":"pointer"});

});

//jQuery(document).ready(function(){
//jQuery(".block-sm h3 a").fadeTo("normal", 0.7); // This sets the opacity of the thumbs to fade down to 60% when the page loads

//jQuery(".block-sm h3 a").hover(function(){
//jQuery(this).fadeTo("normal", 1.0); // This should set the opacity to 100% on hover
//},function(){
//jQuery(this).fadeTo("normal", 0.7); // This should set the opacity back to 60% on mouseout
//});
//});

//	jQuery(document).ready(function(){

//		jQuery(".block-sm h3 a").hide();
//		jQuery(".block-sm").hover(
//			function(){
//				jQuery(this).find("h3 a").fadeIn();
				
//			},
//			function() {
//				jQuery(this).find("h3 a").fadeOut();
//			}
//		);
//	 });

jQuery(document).ready(function(){
				//Full Caption Sliding (Hidden to Visible)
jQuery('.boxgrid.captionfull').hover(function(){
jQuery(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
}, function() {
jQuery(".cover", this).stop().animate({top:'240px'},{queue:false,duration:160});
});
});





jQuery(document).ready( function() {
jQuery('A[rel="external"]').addClass("external").click( function() {
window.open( jQuery(this).attr('href') );
return false;
});
});


//jQuery(document).ready( function() {
//jQuery('.tabsrecbox dd a').addClass("external").click( function() {
//window.open( jQuery(this).attr('href') );
//return false;
//});
//});

//jQuery(document).ready( function() {
//jQuery('.rec-cover a').addClass("external").click( function() {
//window.open( jQuery(this).attr('href') );
//return false;
//});
//});

jQuery(document).ready(function() {
jQuery("#cover .thumb a").append("<div class='zoom'></div>"); 
   });

jQuery(document).ready(function() {
   	jQuery(".zoom").hide(); 
        var hide = true;
             jQuery("#cover .thumb a").hover(function(){
        if (hide) clearTimeout(hide);
        jQuery(".zoom").fadeIn();
    }, function() {
         hide = setTimeout(function() {
            jQuery(".zoom").fadeOut();
        }, 500);
   }); 
  });
  


jQuery(document).ready(function() {
jQuery(".adspot .photo a").append("<div class='zoom'></div>"); 
   });

jQuery(document).ready(function() {
   	jQuery(".zoom").hide(); 
        var hide = true;
             jQuery(".adspot .photo a").hover(function(){
        if (hide) clearTimeout(hide);
        jQuery(".zoom").fadeIn();
    }, function() {
         hide = setTimeout(function() {
            jQuery(".zoom").fadeOut();
        }, 500);
   }); 
  });
  
  


//jQuery(document).ready(function() {
//jQuery("#commentform").validate({
//submitHandler: function(form) {
//jQuery(form).find(":submit").attr("disabled", true).attr("value",
//"Submitting...");
//form.submit();
//}
//})
//});





jQuery(document).ready(function() {
jQuery('.home-features h3 a').jTruncate({
  length: 20,
  minTrail: 0,
  moreText: "",
  lessText: "",
  ellipsisText: "&hellip;"
 });
});

jQuery(document).ready(function() {
jQuery('.boxgrid h3 a').jTruncate({
  length: 50,
  minTrail: 0,
  moreText: "",
  lessText: "",
  ellipsisText: "&hellip;"
 });
});




jQuery(document).ready(function() {
jQuery('#persona').hide();
jQuery('a#get-gravatar').click(function() {
jQuery('#commentform').css({'min-height': '300px'});
jQuery('#persona').fadeIn();
return false;
});

jQuery('#close-gravatar').click(function(){
jQuery('#commentform').css({'min-height': 'inherit'});
jQuery('#persona').fadeOut();

return false;
});

});

jQuery(function() {
jQuery("#affiliates").css("opacity","0.6");
		
jQuery("#affiliates").hover(function () {
										  
jQuery(this).stop().animate({
opacity: 1.0
}, "normal");
},
		
function () {
jQuery(this).stop().animate({
opacity: 0.6
}, "normal");
});
});

jQuery(document).ready(function() {
jQuery(".website-address strong").hide();
});


//jQuery(window).load(function (){
//jQuery(".boxgrid img").center({
//vertical: true,
//horizontal: false
//});
//});

(function(a){a.fn.scaleImage=function(c){var d=a.extend({parent:false,scale:"fill",center:true,fade:0},c);return this.each(function(){var g=a(this);var h=d.parent?g.parents(d.parent):g.parent();h.css({opacity:0,overflow:"hidden"});if(h.length>0){g.removeAttr("height").removeAttr("width");if(this.complete){f(g,h)}else{g.load(function(){f(g,h)})}}});function f(h,k){var r=b(h),s=r.width,j=r.height,t=k.width(),m=k.height(),u=parseInt(h.css("borderLeftWidth"),10)+parseInt(h.css("borderRightWidth"),10),n=parseInt(h.css("borderTopWidth"),10)+parseInt(h.css("borderBottomWidth"),10),q,o,p,l,g;if(m===0||t===0){var i=e(k);t=i.width;m=i.height}u=isNaN(u)?0:u;n=isNaN(n)?0:n;q=t/s;o=m/j;if(d.scale==="fit"){p=q<o?q:o}else{if(d.scale==="fill"){p=q>o?q:o}}l=parseInt(s*p,10)-u;g=parseInt(j*p,10)-n;h.css({width:l,height:g}).attr({width:l,height:g});if(d.center){h.css("margin-left",Math.floor((t-l)/2));h.css("margin-top",Math.floor((m-g)/2))}if(d.fade>0){k.animate({opacity:1},d.fade)}else{k.css("opacity",1)}}function b(h){var g=new Image();g.src=h.attr("src");return{width:g.width,height:g.height}}function e(h){var i=h.clone().css({visibility:"hidden",display:"block",position:"absolute"});a("body").append(i);var g={width:i.width(),height:i.height()};i.remove();return g}}})(jQuery);


jQuery(document).ready(function(){
  jQuery('.boxgrid img').scaleImage({
  	parent : '.boxgrid',
  	center: false
  });
}); 

jQuery(document).ready(function(){
  jQuery('#sliderContent .thumb img').scaleImage({
  	parent : '.thumb',
  	center: false
  });
}); 
