$(document).ready(function(){				   	
// Gallery Product
	
// cycle
	$('.on_middle').cycle({ timeout: 3000, cleartype: 1, speed: 400 });	
		 $('#testi_news').cycle({
			fx: 'fade'
	});

// block box	 
	$('.screenshot_product li, .screenshot_client li, .list_checkout').click(function(){
	}).mouseover(function() {
		$(this).css('backgroundColor','#222');
	}).mouseout(function() {
		$(this).css('backgroundColor','');
	}); 
	
// Click link	
	$(".col_news, .product").mouseover(function(){
		$(this).click(function(){
			window.location=$(this).find("a").attr("href");return false;
		}).mouseover(function() {
			$(this).css('cursor','pointer');
		}).mouseout(function() {
			$(this).css('cursor','pointer');	
		});
	});
	
// Bloked Link true
	$(".productlist li, .acc_home .accor_content, .list_news li, .bt_back").not('.active').mouseover(function(){
		$(this).click(function(){
			window.location=$(this).find("a").attr("href");return false;
		}).mouseover(function() {
			$(this).css('backgroundColor','#222222');
			$(this).css('cursor','pointer');
		}).mouseout(function() {
			$(this).css('backgroundColor','');	
		});
	});
	
// Bloked Link true
	$(".acc_home .accor_content").mouseover(function(){
		$(this).click(function(){
			window.location=$(this).find("a").attr("href");return false;
		}).mouseover(function() {
			$(this).css('backgroundColor','#121212');
			$(this).css('cursor','pointer');
		}).mouseout(function() {
			$(this).css('backgroundColor','');	
		});
	});	
	
//select form	
	$('.confirmation li').click(function(){
		$(this).addClass("active");
		$(this).siblings('.confirmation li').removeClass("active");
	}).mouseover(function() {
		$(this).css('backgroundColor','#222');
	}).mouseout(function() {
		$(this).css('backgroundColor','');	
	});

//select on tab
	$('.data_input input, .data_input textarea, .data_input select').focus(function(){
		$('.confirmation li').removeClass("active");
		$(this).parent().parent().parent().parent().addClass("active");
	});
	
// Color box 
	$("a[rel='shoot']").colorbox({slideshow:true});
	$("a[rel='client_pict']").colorbox({slideshow:true});
	$(".colorbox").colorbox();
	
// Accordion
	$(".accordion h3").eq(0).addClass("active");
	$(".accordion .accor_content").eq(0).show();

	
	$(".accordion h3").click(function(){
		$(this).next(".accor_content, .accor_content2").slideToggle("slow")
		.siblings(".accor_content:visible, .accor_content2:visible").slideUp("slow");	
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
	});
	

//Treeviews
	$("#navigation").treeview({
		animated: "fast",
		persist: "location",
		collapsed: true,
		unique: true
	});	
	
//overlay
	$(".overlay").fadeTo("slow", 0.5); // This sets the opacity of the thumbs to fade down to 30% when the page loads
    $(".overlay").hover(function(){
    $(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
    },function(){
    $(this).fadeTo("slow", 0.5); // This should set the opacity back to 30% on mouseout
    });
	
	//Paging
	$("ul.list_news").quickPager();
	
	//Anchor
	$("a.scroll").click(function(){
		$.scrollTo($("#content_container"), 1000 );
	});
	
	//corner support
	$(".support").corner({bl: { radius: 25 }, br: { radius: 25 }, tl: { radius: 25 }, tr: { radius: 25 }});


});

var flashvars = {};
flashvars.xml = base_url+"media/config.xml";
flashvars.font = "font.swf";
var attributes = {};
attributes.wmode = "transparent";
attributes.id = "slider";
swfobject.embedSWF(base_url+"media/cu3er.swf", "flash_banner", "920", "400", "9", base_url+"js/swfobject/expressInstall.swf", flashvars, attributes);

