if($.browser.mozilla||$.browser.opera){document.removeEventListener("DOMContentLoaded",$.ready,false);document.addEventListener("DOMContentLoaded",function(){$.ready()},false)}$.event.remove(window,"load",$.ready);$.event.add( window,"load",function(){$.ready()});$.extend({includeStates:{},include:function(url,callback,dependency){if(typeof callback!='function'&&!dependency){dependency=callback;callback=null}url=url.replace('\n','');$.includeStates[url]=false;var script=document.createElement('script');script.type='text/javascript';script.onload=function(){$.includeStates[url]=true;if(callback)callback.call(script)};script.onreadystatechange=function(){if(this.readyState!="complete"&&this.readyState!="loaded")return;$.includeStates[url]=true;if(callback)callback.call(script)};script.src=url;if(dependency){if(dependency.constructor!=Array)dependency=[dependency];setTimeout(function(){var valid=true;$.each(dependency,function(k,v){if(!v()){valid=false;return false}});if(valid)document.getElementsByTagName('head')[0].appendChild(script);else setTimeout(arguments.callee,10)},10)}else document.getElementsByTagName('head')[0].appendChild(script);return function(){return $.includeStates[url]}},readyOld:$.ready,ready:function(){if($.isReady) return;imReady=true;$.each($.includeStates,function(url,state){if(!state)return imReady=false});if(imReady){$.readyOld.apply($,arguments)}else{setTimeout(arguments.callee,10)}}});
$.include('js/superfish.js')
$.include('js/tabs.js')
$.include('js/FF-cash.js')
$.include('js/jquery.easing.1.3.js')
$.include('js/jquery.cycle.all.min.js')
$.include('js/cufon-yui.js')
$.include('js/Bebas_400.font.js')
$.include('js/TrashHand_400.font.js')
$.include('js/jquery.color.js')
$.include('js/jquery.jcarousel.js')
$(function(){
	Cufon.replace('div.logo,.cs-title p,#coin-slider .banner p,h1,h2,h3,h4,h5,h6,.text-2,.dropcap_2,.text-3',{fontFamily:'Bebas'});
	Cufon.replace('.sf-menu a,.button,.button1,.top1',{fontFamily:'Bebas',hover:true});
	Cufon.replace('a.logo,.footer-logo',{fontFamily:'TrashHand'});
	Cufon.now()
	if($('#coin-slider').length)$.include('js/coin-slider.js')
	if($('.fixedtip').length||$('.clicktip').length||$('.normaltip').length)$.include('js/jquery.atooltip.pack.js')
	if($('#contact-form').length)$.include('js/contact-form.js')
	if($('.top1').length||$('.layouts-nav li a').length)$.include('js/scrollTop.js')
	if($('.kwicks').length)$.include('js/kwicks-1.5.1.pack.js')
	if($("#thumbs").length){
		$.include('js/jquery.opacityrollover.js')
		$.include('js/jquery.galleriffic.js')
	}
	if($(".lightbox-image").length)$.include('js/jquery.prettyPhoto.js')
	if($("#twitter").length)$.include('js/jquery.twitter.js')
	if($('#countdown_dashboard').length)$.include('js/jquery.lwtCountdown-1.0.js')
	if($("#advanced").length){
		$("#advanced").append('<span class="trigger"></span><ul><li class="trigger_adv"><span>Pages</span><ul><li><a href="under_construction.html">Under construction</a></li><li><a href="intro.html">intro page</a></li><li><a href="404.html">404 page</a></li></ul></li><li><a href="layouts.html">Layouts</a><li><a href="typography.html">Typography</a></li><li class="trigger_adv"><span>Interactive</span><ul><li><a href="coin-slider.html">slider</a><ul><li><a href="coin-slider.html">coin slider</a></li><li><a href="kwicks.html">kwicks slider</a></li></ul></li><li><a href="functional-slider.html">functional slider</a></li><li><a href="gallery-page1.html">simple gallery</a></li><li><a href="gallery-page2.html">advanced gallery</a></li><li><a href="misc.html" class="current">misc</a></li></ul></li></ul>')
		$("#advanced .trigger").toggle(function(){$(this).parent().animate({right:0},"medium")},function(){$(this).parent().animate({right:-172},"medium")})
	}
	$('.top1').click(function(e){$('html,body').animate({scrollTop:'0px'},800);return false})
	$('.layouts-nav li a').click(function(){var offset=$($(this).attr('href')).offset();$('html,body').animate({scrollTop:offset.top},800);return false})
	$("#accordion dt").click(function(){$(this).next("#accordion dd").slideToggle("slow").siblings("#accordion dd:visible").slideUp("slow");$(this).toggleClass("active");$(this).siblings("#accordion dt").removeClass("active");return false})
	$(".slideDown dt").click(function(){$(this).toggleClass("active").parent(".slideDown").find("dd").slideToggle()})
	$(".code a.code-icon").toggle(function(){$(this).find("i").text("-");Cufon.refresh();$(this).next("div.grabber").slideDown()},function(){$(this).find("i").text("+");Cufon.refresh();$(this).next("div.grabber").slideUp()})
	$('.sf-menu li li').not('.current').hover(function(){$(this).find('span').stop().css({bottom:'auto',top:0,visibility:'visible'}).animate({height:'100%'},300)},function(){$(this).not('.sfHover').find('span').stop().css({bottom:0,top:'auto'}).animate({height:0},300)})
	$('.sf-menu li li li').not('.current').hover(function(){$(this).find('i').stop().css({bottom:'auto',top:0,visibility:'visible'}).animate({height:'100%'},300)},function(){$(this).not('.sfHover').find('i').stop().css({bottom:0,top:'auto'}).animate({height:0},300)})
	$('.button').hover(function(){$(this).stop().animate({backgroundColor:'#8ad41b'},300)},function(){$(this).stop().animate({backgroundColor:'#dbdbdb'})})
	$('.button1').hover(function(){$(this).stop().animate({backgroundColor:'#00727f'})},function(){$(this).stop().animate({backgroundColor:'#fff'},300)})
	$('.icon').each(function(){
		$(this).find('img').eq(1).css({position:'absolute',top:0,left:0}).animate({opacity:0},0)
		$(this).hover(function(){$(this).find('img').eq(0).stop().animate({opacity:0});$(this).find('img').eq(1).stop().animate({opacity:1})},function(){$(this).find('img').eq(0).stop().animate({opacity:1});$(this).find('img').eq(1).stop().animate({opacity:0})})
	})
	$('footer .privacy').hover(function(){$(this).stop().animate({color:'#000'},300)},function(){$(this).stop().animate({color:'#838383'})})
	$('.box').hover(function(){$(this).stop().animate({backgroundColor:'#e2e2e2'})},function(){$(this).stop().animate({backgroundColor:'#f6f6f6'})})
	$('.block').hover(function(){$(this).stop().animate({backgroundColor:'#33619c',color:'#fff'})},function(){$(this).stop().animate({backgroundColor:'#e2e4e8',color:'#778eaa'})})
	$('#search1 a,#search a,#newsletter-alt-form a').hover(function(){$(this).stop().animate({backgroundColor:'#00cdff'})},function(){$(this).stop().animate({backgroundColor:'#dbdbdb'})})
	$('.links a').hover(function(){$(this).stop().animate({color:'#00d9ff'},300)},function(){$(this).stop().animate({color:'#909090'})})
})			
function onAfter(curr, next, opts, fwd){var $ht=$(this).height();$(this).parent().animate({height:$ht})}
