// JavaScript Document

      $(document).ready(function() {

		$('.aboutContant').css({top:-500});
		

		
		var $about = $(".innerAbout");
		var $service= $(".innerServices");
		var $portfolio= $(".innerPortfolio");
		var $clients= $(".innerClients");
		
	var $the_height=$service.outerHeight();
	var $the_width=$service.outerWidth();

		if ($the_width > 1500)
			$('.in_text').css({"font-size":14});

		if ($the_height> 700)
			$('.in_text').css({"font-size":14});

		if ($the_height> 1000)
			$('.in_text').css({"font-size":16});

		function resetPage($pagename)
		{
			var $pagename;
			var $page_title=$pagename.attr("group");
			if ($page_title=="about")
			{
				$about.css({left:-$the_width});
				$about.css({bottom:0});
			}
			if ($page_title=="services")
			{
				$service.css({left:$the_width});
				$service.css({bottom:0});
			}
			if ($page_title=="portfolio")
			{
				$portfolio.css({left:0});
				$portfolio.css({bottom:$the_height});
			}
			if ($page_title=="clients")
			{
				$clients.css({left:0});
				$clients.css({bottom:-$the_height});
			}
/*					var $r=$clients.css("bottom");
					var $ll=$clients.css("left");
					alert($r+" : "+$ll);*/
		}
		function resetDiv()
		{
			$about.css({left:0});
			
			$service.css({left:$the_width});
			$service.css({bottom:0});
			
			$portfolio.css({left:0});
			$portfolio.css({bottom:$the_height});
			$clients.css({bottom:-$the_height});
		}
		resetDiv();
		
	
	$hh=$the_height-150;
	$hh=($hh/3) - 20;
	
//	alert($hh);
//	$(".innerAbout1").animate({width:"99%",height:"98%",top:"0",left:"0"}, {duration: 1000, easing:"jswing"});
	$("#box1").animate({top: 30}, {duration: 1500, easing:"easeOutBounce"});
	$("#Titlebox1").animate({right:30 }, {duration: 1000, easing:"jswing"});
	$("#content_text1").animate({left:-10}, {duration: 2000, easing:"jswing"});

/*	var $content_height=$the_height*2/3;
	$("#content_text").css({height:$content_height});
*/
/*	$("#content_text2").animate({opacity: 1}, {duration: 5000, easing:"jswing"});*/
	
	
	var $oldPage=$about;
	var $currentPage=$about;
	
	///////// CLIENTS MENU ///////////////
    $('#clie1').click(function() {
//					$("#box1").animate({top: "-950"}, {duration: 2000, easing:"easeOutBounce"});
/*					$("#box4").animate({top: $hh}, {duration: 2000, easing:"easeOutBounce"});
					$("#Titlebox4").animate({left: "50"}, {duration: 1000, easing:"jswing"});
*/
			if ($currentPage.attr("group")!="clients")
			{		

					$clients.css({"z-index":10});

					$oldPage=$currentPage;
					$currentPage=$clients;
					$oldPage.animate({bottom:+$the_height},function(){
																							$oldPage.css({"z-index":0});
																							resetPage($oldPage);
																							//$oldPage.css({bottom:0});
																							//$oldPage.css({left:-$the_width});
																						//	alert("A");
	   
																			   });
					$clients.animate({bottom:0});
					

			}
	});

	///////// PORTFOLIO MENU ///////////////
    $('#port1').click(function() {
//					$("#box1").animate({top: "-950"}, {duration: 2000, easing:"easeOutBounce"});
/*					$("#box3").animate({top: $hh}, {duration: 2000, easing:"easeOutBounce"});
					$("#Titlebox3").animate({left: "50"}, {duration: 1000, easing:"jswing"});
*/
			if ($currentPage.attr("group")!="portfolio")
			{		

					$portfolio.css({"z-index":10});

					$oldPage=$currentPage;
					$currentPage=$portfolio;
					$oldPage.animate({bottom:-$the_height},function(){
																							$oldPage.css({"z-index":0});
																							resetPage($oldPage);
																							//$oldPage.css({bottom:0});
																							//$oldPage.css({left:-$the_width});
																						//	alert("A");
	   
																			   });
					$portfolio.animate({bottom:0});

	
			}
	});


	///////// SERVICE MENU ///////////////
    $('#serv1').click(function() {
/*					$("#box1").animate({top: 30}, {duration: 1500, easing:"easeOutBounce"});
					$("#Titlebox1").animate({right:30 }, {duration: 1000, easing:"jswing"});
					$("#content_text1").animate({left:-10}, {duration: 2000, easing:"jswing"});
*/
			if ($currentPage.attr("group")!="services")
			{		

					$service.css({"z-index":10});
					$oldPage=$currentPage;
					$currentPage=$service;
					$oldPage.animate({left: -$about.outerWidth()},function(){
																							$oldPage.css({"z-index":0});
																							resetPage($oldPage);
																							//$oldPage.css({left:0});
																							//$oldPage.css({bottom:$the_height});
																						//	alert("A");
	   
																			   });
					$service.animate({left: 0});
	
//					$about.css({left:-$about.outerWidth()});
//					$portfolio.css({bottom:$portfolio.outerHeight()});
			}
	});



		///////// ABOUT MENU ///////////////
    $('#abo1').click(function() {
		
			if ($currentPage.attr("group")!="about")
			{		
/*					$("#box2").animate({top: "-950"}, {duration: 2000, easing:"easeOutBounce"});
					$("#Titlebox1").animate({right:30}, {duration: 2000, easing:"easeOutBounce"});
*/					$about.css({"z-index":10});
					
					$oldPage=$currentPage;
					$currentPage=$about;
					$oldPage.animate({left: $service.outerWidth()},function(){
																							$oldPage.css({"z-index":0});
																							resetPage($oldPage);
																							//$oldPage.css({left:0});
																							//$oldPage.css({bottom:$the_height});
																						//	alert("A");
	   
																			   });
					$about.animate({left: 0});

//					$service.css({left:$service.outerWidth()});
//					$portfolio.css({bottom:$portfolio.outerHeight()});
			}
	});


/*
        $('#button2').click(function() {
    $about.animate({left: parseInt($about.css('left'),10) == 0 ? -$about.outerWidth() : 0});
    $service.animate({left: parseInt($service.css('left'),10) == 0 ? -$service.outerWidth() : 0});
    $about.css({left:$about.outerWidth()+5 });
	
	});
*/

 //  var $serv_back=$(".servContantDivD").html();

	///////// CLIENTS MENU ///////////////
    $('.Menus').click(function() {
		
		var $arr = [];
		$arr[1]="Ibtikar Studios develop identities from scratch.<br><br>We  also help existing companies to rebrand what they already have by accurate measurements of their corporate culture and background, taking into consideration every little detail and making sure we re-adjust the identity to long last the future.<br><br>We create a brand and protect it by providing the guidelines of using the identity,with an unlimited number of applications, all in perfect harmony.<br>";
		$arr[2]="The wide exposure of our team members, coming from diverse backgrounds and also having in common perfect expertise and understanding of the Syrian culture, is what differentiates us, we are creative by nature, in every move we do. Creating and advertising is what it’s all about.<br><br>Ibtikar Studios, through RESEARCH we provide advertising campaign concepts.<br>Through RESEARCH with or without twists, through RESEARCH we respect the “brain” of the receiver, we make sure we deliver messages in the best way we could, we make sure our ads will simply remain there, not on a billboard or a magazine over, remain there in the head of the viewer, and more over… they will discuss it and enjoy talking about it, this is what we do…we give you something to talk about the next time you meet friends.. Our campaigns.";
		$arr[3]="";
		$arr[4]="Ibtikar Studios is ‘the lucky sister company’, we utilize what is accomplished through INDICATE, that does marketing and advertising research.<br>Through the Media Consumption Research*(MCR) conducted by INDICATE, we base decisions upon research, who is watching what at what time and where, these are answers that we provide to questions clients usually answer by either guessing or simply making decisions based on feelings. Feelings are not what we decide upon in this slide, that we do a couple of slides back, in creativity, we use feelings, not when spending money.<br>*Media Consumption Research (MCR), a research conducted by INDICATE , this study will measure the audience for each media channel, including peak times viewership, research to be sold to various clients who pre-subscribed to it, the clients includes advertisers, local and multinational companies who spend on advertising in Syria.";
		$arr[5]="In Ibtikar Studios, we believe that sharing what we know will simply make us know more. Based on research, we know what is right and what is wrong, we collect facts, transform it into figures, we take the information and produce data, that based on it we help you plan.<br><br>We know how hard it is to make money, we know by better placement of budgets you will have excessive money in your core business and develop what you already do, we help you reduce wastage, by spending “right”, we help you believe in what we do, so you will let us do it for much longer.<br>";
		$arr[6]="We buy media, we produce research, Media Consumption Research (MCR)… <br><br>Media agencies want us to be happy, do you think they will charge us high rates?<br><br>Whether they do or don’t, it won’t change their positioning in the MCR!<br><br>They will not charge high rates, and we will get the best rates, for you and for us!";
		$arr[7]="Pick up the closest magazine in sight, go through it, you will find one of our board members in an event! We are everywhere, we know everyone, we will get it done for you, and you will be delighted!";
		$arr[8]="Ibtikar Studios is an on-liner by nature, visit our website and you will know how comfortable Ibtikar is on the net..<br><br>Through the sister company, Masaader.com, we know how to connect with people through their screens!";
		$arr[9]="You get good at what you do when you work hard to know how to do it, who is better than you?! A son of a “do-er”. <br><br>PR is genetic in Ibtikar Studios; you cannot hide where you come from.";
		$arr[10]="Internally and externally, we will enlighten you with ‘ibtikarized’ methodologies of how to be responsible towards your culture and environment on multiple levels.<br><br> We will make your company loved and respected.";
		
		
	   var $serv_menu_id=$(this).attr("group");
  	   var $serv_title="<div class='Menus1'>"+$(this).attr("group")+"</div><br><div class='servContantDiv'>"+$arr[$serv_menu_id]+"</div>";

			
		
		$(".serviceContantMenu").animate({top:-500});
		$('.serviceContant').css({visibility:"visible"});
		$(".servContantDivD").html($serv_title);
		$(".serviceContant").animate({top:0});
		
							   });
	
	
	    $('.MenusBack').click(function() {
		

				$(".serviceContant").animate({top:-500});
				$(".serviceContantMenu").animate({top:0});
		
							   });
	
////////////////////////
    $('.Menus2').click(function() {
		
		var $arr = [];
		$arr[1]="CNR Marketing LLC, owns companies that operate in the field of marketing, each company is a separate entity that operates in different fields.<br><br>CNR Marketing LLC. already established projects in the area of marketing and advertising research.";
		$arr[2]="<b>Vision:</b><br>To be the leading advertising agency in Syria.<br><br><b>Mission:</b><br>To raise up the bar when it comes to quality design, we believe that the Syrian receiver can become a quality receiver, we will provide state of the art creative jobs, no place will be left in the market for  non- professionals.";
		$arr[3]="<b>Rami Khoury</b><br>Managing Partner/Creative Director, Ibtikar Studios, BS Visual Communications, American University of Sharjah, AUS, Graduate Gemologist, Gemological Institute of America, Italy, Over 10 years international experience including Syria<br><br><b>Bisher Challah</b><br>CNR Marketing, Partner & Advisor, BSBA Finance & Marketing, AUS, MBA, Business School Lemania BSL-IUKB, Switzerland, Over 8 years of international experience, Business Development.<br><br><b>Khaled Challah</b><br>CNR Marketing, Managing Partner, BS Marketing, Lebanese American University, Over 5 years experience in Marketing. <br><br><b>Firas Rankousi</b><br>CNR Marketing Partner, INDICATE Chief Operation Officer, B.Commerce & Marketing, Concordia University, Canada, Over 4 years experience in Marketing & Advertising Research.";
		
	   var $serv_menu_id=$(this).attr("group");
  	   var $serv_title="<div class='Menus1'>"+$(this).attr("group")+"</div><br><div class='aboutContantDiv'>"+$arr[$serv_menu_id]+"</div>";

			
		
		$(".aboutContantDivD").html($serv_title);
		$(".aboutContantMenu").animate({top:-200},"fast",function() {
														   
		$(".aboutContant").animate({top:0},"fast");
														   
														   });
//		$('.aboutContant').css({visibility:"visible"});
		
    });
	
	
	    $('.aboutMenusBack').click(function() {
		

				$(".aboutContant").animate({top:-500});
				$(".aboutContantMenu").animate({top:0});
		
		});
	

	
	
});

