$(document).ready(function(){
	
function fullscreen() 
{ 
window.open('main.html','fs','width='+screen.width+',height='+screen.height+',top=0,left=0'); 
} 
	
$(".prev, .next, .closeimage, .logofs").delay(1000).fadeTo("slow", 0)
$(".prev, .next, .closeimage, .logofs").hover(function(){
$(this).stop().fadeTo("slow", 1.0)
},function(){
$(this).stop().fadeTo("slow", 0)
});

$(".prevhover").hover(function(){
$('.prev, .closeimage, .logofs, .next').stop().fadeTo("slow", 1.0)
},function(){
$('.prev, .closeimage, .logofs, .next').stop().fadeTo("slow", 0)
});

$(".nexthover").hover(function(){
$('.next, .closeimage, .logofs, .prev').stop().fadeTo("slow", 1.0)
},function(){
$('.next, .closeimage, .logofs, .prev').stop().fadeTo("slow", 0)
});		

$('.glowbar, .glowbarclose, #coverall').hover(function(){
$('.glowbar, .glowbarclose').css('background-position', 'top left');	
},function(){
$('.glowbar, .glowbarclose').css('background-position', 'top right');		
});

//$('.menuopen, #coverall').mouseover(function() {
//$(".darkbitnew, .menuopen, #coverall, .prevhover, .nexthover").hide();
//$(".slider").fadeOut();
//$("#leftbarnew").animate({'width':'365px'},600);
//$(".logo").animate({'margin-left':'14px'},600);
//$(".hidden").fadeTo("slow", 1.0)
//$("#allcontent").animate({'margin-left':'330px'},600);
//$(".left10, .clientloginetc").delay(300).fadeIn();
//$(".menuclose").delay(300).fadeIn();	
//});
//
//$('.menuclose').hover(function() {
//$("#coverall, .prevhover, .nexthover").show();
//$(".left10, .clientloginetc").fadeOut();
//$(".darkbitnew, .menuclose").hide();
//$(".menuopen").delay(300).fadeIn();	
//$("#leftbarnew").animate({'width':'35px'},600);
//$(".hidden").fadeTo("slow", 0)
//$(".logo").animate({'margin-left':'40px'},600);
//$("#allcontent").animate({'margin-left':'0'},600);
//$(".slider").fadeIn();
//});

$('.menuopen').stop().mouseover(function() {
$(".menuopen, .prevhover, .nexthover, .slider, .left360340").hide();
$("#leftbarnew").animate({'width':'365px'},600);
$(".logo").animate({'margin-left':'14px'},600);
$(".hidden").fadeTo("slow", 1.0)
$("#allcontent").animate({'margin-left':'330px'},600);
$(".left10, .clientloginetc, .menuclose").delay(300).fadeIn();
});

$('.menuclose').stop().click(function() {
$(" .prevhover, .nexthover").show();
$(".left10, .clientloginetc").fadeOut();
$(".menuclose").hide();	
$(".menuopen").delay(300).fadeIn();	
$("#leftbarnew").animate({'width':'35px'},600);
$(".hidden").fadeTo("slow", 0)
$(".logo").animate({'margin-left':'40px'},600);
$("#allcontent").animate({'margin-left':'0'},600);
$(".slider").fadeIn();
$(".left360340").delay(600).fadeIn();
});

$('.doit').hover(function(){
if ( navigator.appName != "Microsoft Internet Explorer" ) {
	$('.doit').stop().fadeTo("slow", 0.3);
	$(this).stop().fadeTo("fast", 1.0);
}
$(this).css('background-position', '0 -30px');
},function(){
if ( navigator.appName != "Microsoft Internet Explorer" ) {
	$('.doit').stop().fadeTo("slow", 1.0);
}
$(this).css('background-position', '0 0');
});

$('.sm').hover(function(){
if ( navigator.appName != "Microsoft Internet Explorer" ) {
	$('.sm').stop().fadeTo("slow", 0.3);
	$(this).stop().fadeTo("fast", 1.0);
}
$(this).css('background-position', '0 -51px');
},function(){
if ( navigator.appName != "Microsoft Internet Explorer" ) {
	$('.sm').stop().fadeTo("slow", 1.0);
}
$(this).css('background-position', '0 0');
});

$('.sm2').hover(function(){
if ( navigator.appName != "Microsoft Internet Explorer" ) {
	$('.sm2').stop().fadeTo("slow", 0.3);
	$(this).stop().fadeTo("fast", 1.0);
}
$(this).css('background-position', '0 -20px');
},function(){
if ( navigator.appName != "Microsoft Internet Explorer" ) {
	$('.sm2').stop().fadeTo("slow", 1.0);
}
$(this).css('background-position', '0 0');
});

$('.sm3').hover(function(){
$(this).css('background-position', 'bottom right');
},function(){
$(this).css('background-position', 'top right');
});

$('.nglow, .eglow').hover(function(){
$(this).css('background-position', 'bottom left');
},function(){
$(this).css('background-position', 'top left');
});

var $flags = $('.flag1, .flag2, .flag3, .flag4, .flag5, .flag6, .flag7');
$flags.hover(function(){
$flags.stop().fadeTo("slow", 0.3)
$(this).stop().fadeTo("fast", 1.0)
$(this).css('background-position', '0 0');
},function(){
$flags.stop().fadeTo("slow", 1.0)
$(this).css('background-position', '0 -19px');
});

$('.popup').click(function() {
$("#coverme").fadeTo("slow", 1.0);
$("#popup").delay(300).fadeTo("fast", 1.0);	
});

$('.shut').click(function() {
$("#popup").fadeOut();
$("#coverme").delay(300).fadeOut();
});

$('.openportfolio').click(function() {
$("#mainmenu").hide();
$("#portfoliomenu").delay(100).show();	
});

$('.backportfolio').click(function() {
$("#portfoliomenu").hide();
$("#mainmenu").delay(100).show();	
});

$('.openstills').click(function() {
$("#mainmenu").hide();
$("#stillsmenu").delay(100).show();	
});

$('.backstills').click(function() {
$("#stillsmenu").hide();
$("#mainmenu").delay(100).show();	
});

$('.openvideo').click(function() {
$("#mainmenu").hide();
$("#videomenu").delay(100).show();	
});

$('.backvideo').click(function() {
$("#videomenu").hide();
$("#mainmenu").delay(100).show();	
});

$('.openwhatwedo').click(function() {
$("#mainmenu").hide();
$("#whatwedomenu").delay(100).show();	
});

$('.backwhatwedo').click(function() {
$("#whatwedomenu").hide();
$("#mainmenu").delay(100).show();	
});

$('.openpostproduction').click(function() {
$("#whatwedomenu").hide();
$("#postproductionmenu").delay(100).show();	
});

$('.backpostproduction').click(function() {
$("#postproductionmenu").hide();
$("#whatwedomenu").delay(100).show();	
});

$('.openstudiofacilities').click(function() {
$("#whatwedomenu").hide();
$("#studiofacilitiesmenu").delay(100).show();	
});

$('.backstudiofacilities').click(function() {
$("#studiofacilitiesmenu").hide();
$("#whatwedomenu").delay(100).show();	
});

$('.opencontact').click(function() {
$("#mainmenu").hide();
$("#contactmenu").delay(100).show();	
});

$('.backcontact').click(function() {
$("#contactmenu").hide();
$("#mainmenu").delay(100).show();	
});

$('.backecommerce').click(function() {
$("#ecommercemenu").hide();
$("#mainmenu").delay(100).show();	
});

$('.openecommerce').click(function() {
$("#mainmenu").hide();
$("#ecommercemenu").delay(100).show();	
});

$('.fader').hover(function() {
$('.fader').stop().fadeTo("slow", 0.2);
$(this).stop().fadeTo("fast", 1.0);
},
function() {
$('.fader').stop().fadeTo("slow", 1.0);
});

});
