wp/wp-content/themes/IN-MOTION-package-u1/in-motion/header.php
changeset 0 d970ebf37754
child 7 cf61fcea0001
equal deleted inserted replaced
-1:000000000000 0:d970ebf37754
       
     1 <?php include("scripts/contact-form.php"); ?>
       
     2 <!DOCTYPE html>
       
     3 <html <?php language_attributes(); ?>
       
     4 	<head>
       
     5 		<!-- Meta Tags -->
       
     6 		<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
       
     7 		<meta name="viewport" content="initial-scale=1, maximum-scale=1" />
       
     8   		<meta name="viewport" content="width=device-width" />
       
     9 		<title><?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?></title>
       
    10 
       
    11 		<!-- Stylesheets -->
       
    12 		<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/style.css" type="text/css" media="screen" />
       
    13 		<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/reset.css" type="text/css" media="screen" />
       
    14 		<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
       
    15 		<!--[if lt IE 9]>
       
    16 			<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/ie8-and-down.css" />
       
    17 		<![endif]-->
       
    18 		<!--[if lte IE 8]>
       
    19 		  <link rel="stylesheet" type="text/css" media="screen" href="<?php echo get_template_directory_uri(); ?>/css/ie8.css" />
       
    20 		<![endif]-->		
       
    21 		
       
    22 		<!-- Fonts -->
       
    23 		<link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css' />		
       
    24 		<!-- Favicon -->
       
    25 		<?php
       
    26 		$favicon =  get_template_directory_uri().'/favicon.ico';
       
    27 		if ( function_exists( 'get_option_tree' ) ) {
       
    28     		    if (get_option_tree( 'favicon')) {
       
    29     		    	$favicon = get_option_tree( 'favicon' );
       
    30 				}
       
    31 			}
       
    32 		?>
       
    33 		<link rel="icon" href="<?php echo $favicon; ?>" type="image/x-ico" />
       
    34 		<!-- Check for option tree -->
       
    35 		<?php
       
    36   			if ( !function_exists( 'get_option_tree') ) {
       
    37 				echo '<h1 style="color:white; background-color:#494a4a;">You need the Option Tree plugin installed for this theme!<br/>
       
    38 					You can get it here: <a href="http://wordpress.org/extend/plugins/option-tree/" target="_blank" class="ot-warning">Option tree</a></h1>';
       
    39 			}
       
    40 		?>
       
    41 
       
    42 		
       
    43 		<!-- start for google maps -->	
       
    44 		<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
       
    45 		
       
    46 		<?php 
       
    47 			$map_latitude_value='';
       
    48 			$map_longitude_value='';
       
    49 			$map_pin_picture='';
       
    50 			if ( function_exists( 'get_option_tree') ) {
       
    51 				if( get_option_tree( 'map_latitude_value') ) {
       
    52 					$map_latitude_value=get_option_tree( 'map_latitude_value');
       
    53 				}
       
    54 				if( get_option_tree( 'map_longitude_value') ) {
       
    55 					$map_longitude_value=get_option_tree( 'map_longitude_value');
       
    56 				}
       
    57 				if( get_option_tree( 'map_pin_picture') ) {
       
    58 					$map_pin_picture=get_option_tree( 'map_pin_picture');
       
    59 				}		 	
       
    60 			}			
       
    61 		?>			
       
    62 		<!-- end for google maps -->		
       
    63 		
       
    64 		<!-- main template color -->
       
    65 		<?php 
       
    66 			$main_template_color = "#91a4ac";
       
    67 			if ( function_exists( 'get_option_tree' ) ) {
       
    68     		    if (get_option_tree( 'main_template_color')) {
       
    69     		    	$main_template_color = get_option_tree( 'main_template_color' );
       
    70 				}
       
    71 			}
       
    72 			$css_output='<style type="text/css">';
       
    73 			$css_output.=' .hl-main, .button a, .circle-p1, #eden a.ajax-back, #eden .client-stuff p, #eden .url-stuff a, .post-title, input#submit, #sidebar-right input#searchsubmit, #main-menu a, a.readmore, .quote, #contact-form #submit-button  {background-color: '.$main_template_color.'; }';
       
    74 			$css_output.=' a, #portfolio-filter ul li a:hover, #portfolio-filter li.active a, #eden .item-desc p, p.contact-paragraph-call span, .list-1 li a:hover,  p.blog-post-date,  .blog-details ul li a, .blog-post-tags a, #respond h3,  .reply a, #respond a, h3#comments, ol.commentlist li div.comment-meta a,   #sidebar-right .widget ul li a:hover, h4.widget-title, #foot-col1 a, #foot-col2 a, #foot-col3 a, #foot-col4 a,  #foot-col1 a, #foot-col2 a, #foot-col3 a, #foot-col4 a,  #foot-col1 a:hover, #foot-col2 a:hover, #foot-col3 a:hover, #foot-col4 a:hover, .menu-inside a:hover, .menu-inside .current a  {color: '.$main_template_color.'; }';
       
    75 			$css_output.='  .post-date, .news-date {background: '.$main_template_color.'; }';
       
    76 			$css_output.=' #headerSlideContainer {border-top: 3px solid '.$main_template_color.';}'; 
       
    77 			
       
    78 			$css_output.=' .dotted-line { border-bottom: 2px dashed '.$main_template_color.';}'; 			
       
    79 			$css_output.=' .blog-post-tags a:hover {border-bottom: 1px dashed '.$main_template_color.';}'; 	
       
    80 			$css_output.=' #header {	border-bottom: 4px solid '.$main_template_color.';}';
       
    81 			$css_output.=' .page-title {	background: '.$main_template_color.' url('. get_template_directory_uri() .'/images/bg-title.png) repeat;}';
       
    82 			$css_output.=' ::selection {background: '.$main_template_color.'; }';
       
    83 			$css_output.=' ::-moz-selection {background: '.$main_template_color.'; }';
       
    84 			if ( function_exists( 'get_option_tree') ) {	
       
    85 				if (get_option_tree( 'heading_h1_size')) {
       
    86 					$css_output.=' h1 { font-size: '.get_option_tree( 'heading_h1_size').'px; }';				
       
    87 				}
       
    88 				if (get_option_tree( 'heading_h2_size')) {
       
    89 					$css_output.=' h2 { font-size: '.get_option_tree( 'heading_h2_size').'px; }';				
       
    90 				}
       
    91 				if (get_option_tree( 'heading_h3_size')) {
       
    92 					$css_output.=' h3 { font-size: '.get_option_tree( 'heading_h3_size').'px; }';				
       
    93 				}
       
    94 				if (get_option_tree( 'heading_h4_size')) {
       
    95 					$css_output.=' h4 { font-size: '.get_option_tree( 'heading_h4_size').'px; }';				
       
    96 				}
       
    97 			}
       
    98 			$css_output.='</style>';
       
    99 			echo $css_output;
       
   100    
       
   101 		?>
       
   102 		<!--  code for google analytics -->
       
   103 		<?php 
       
   104 		$googleAnalitics = '';
       
   105 		if ( function_exists( 'get_option_tree') ) {
       
   106 				$googleAnalitics = get_option_tree( 'google_analytics');
       
   107 				echo $googleAnalitics;
       
   108 		}
       
   109 		?>	
       
   110 <script type="text/javascript">
       
   111 			(function() {
       
   112 				window.onload = function(){
       
   113 				
       
   114 				var pinkParksStyles = '';
       
   115 				
       
   116 				if (jQuery.browser.msie  && parseInt(jQuery.browser.version, 10) === 8) {
       
   117 				
       
   118 				} else {
       
   119 					var pinkParksStyles = [ { stylers: [ { invert_lightness: false }, { hue: "#ff0000" }, { saturation: -92 }, { lightness: 5 } ] },{ featureType: "poi", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "road", elementType: "labels", stylers: [ { visibility: "on" }, { lightness: 20 } ] },{ featureType: "landscape", stylers: [ { visibility: "off" } ] },{ featureType: "transit.station", elementType: "labels", stylers: [ { lightness: 100 } ] },{ featureType: "road.arterial", stylers: [ { visibility: "on" } ] },{ } ];
       
   120 				}
       
   121 
       
   122 					
       
   123 				var pinkMapType = new google.maps.StyledMapType(pinkParksStyles,
       
   124 					{name: "Our Location"});
       
   125 				var mapOptions = {
       
   126 					zoom: 11,
       
   127 					center: new google.maps.LatLng(<?php echo $map_latitude_value; ?>, <?php echo $map_longitude_value; ?>),
       
   128 					mapTypeControlOptions: {
       
   129 					mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'pink_parks']
       
   130 					}
       
   131 				};
       
   132 				var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
       
   133 				  map.mapTypes.set('pink_parks', pinkMapType);
       
   134 				  map.setMapTypeId('pink_parks');
       
   135   
       
   136 				var image = "<?php echo $map_pin_picture; ?>";
       
   137 
       
   138 				var marker = new google.maps.Marker({
       
   139 					position: new google.maps.LatLng(<?php echo $map_latitude_value ?>, <?php echo $map_longitude_value ?>),
       
   140 					map: map,
       
   141 					icon: image
       
   142 				}); 
       
   143 				}
       
   144 			})();
       
   145 		</script>
       
   146 
       
   147 		<?php wp_enqueue_script('jquery'); ?>
       
   148 		<?php wp_head(); ?>
       
   149 	</head>
       
   150  <?php
       
   151 	//default background start
       
   152 	$default_body_data='';
       
   153 	$default_fix_image=0;
       
   154 	$default_background_image='';
       
   155 	$default_background_repeat='';
       
   156 	if ( function_exists( 'get_option_tree') ){
       
   157 			if( get_option_tree( 'default_background_color') ) {
       
   158 				$default_background_color=get_option_tree( 'default_background_color');
       
   159 					if (!empty($default_background_color)){
       
   160 							$default_body_data.=' '.$default_background_color;							
       
   161 					}
       
   162 			}
       
   163 			if( get_option_tree( 'default_background_image')) {
       
   164 				$default_background_image=get_option_tree( 'default_background_image');
       
   165 				$default_background_repeat=get_option_tree( 'default_background_repeat');
       
   166 				switch ($default_background_repeat ) {
       
   167 				    case 'No repeat':
       
   168 				        $default_background_repeat='no-repeat';
       
   169 				        $default_fix_image++;
       
   170 				        break;
       
   171 				    case 'Repeat':
       
   172 				        $default_background_repeat='repeat';
       
   173 				        break;
       
   174 				    case 'Repeat x':
       
   175 				        $default_background_repeat='repeat-x';
       
   176 				        break;
       
   177 				    case 'Repeat y':
       
   178 				        $default_background_repeat='repeat-y';
       
   179 				        break;
       
   180 				    default:
       
   181 				    	  $default_background_repeat='no-repeat';
       
   182 				        break;
       
   183 				}
       
   184 				
       
   185 				if (!empty($default_background_image)){
       
   186 							$default_body_data.=' url('.$default_background_image.') top center '.$default_background_repeat.'';
       
   187 							$default_fix_image++;
       
   188 							$picture=$default_background_image;
       
   189 					}
       
   190 			}
       
   191    
       
   192 			
       
   193 			if (!empty($default_body_data)){
       
   194 					$default_body_data=' style="background:'.$default_body_data.'; background-attachment:fixed;" ';
       
   195 			}
       
   196 			else {
       
   197 					$default_body_data='';	
       
   198 			}
       
   199 	}  
       
   200 	//default background end
       
   201 	?>
       
   202 	<body <?php body_class(); ?><?php echo $default_body_data;  ?> >
       
   203 		
       
   204 
       
   205 	<div id="all-wrapper">
       
   206 	
       
   207 	
       
   208 	
       
   209 		<div id="left-sidebar"><!-- start left-sidebar -->
       
   210 			<div id="logo" class="fl"><!-- start logo -->
       
   211 				<?php 
       
   212 				global $option_tree;
       
   213 				if ( function_exists( 'get_option_tree') ) {
       
   214 					$option_tree = get_option('option_tree');
       
   215 				}
       
   216 				
       
   217 						$logo='';
       
   218 						if ( function_exists( 'get_option_tree' ) ) {
       
   219 							$logo = get_option_tree( 'logo' );
       
   220 						}
       
   221 						if ( $logo != '' ) { ?>								
       
   222 							<a href="<?php echo get_option('siteurl'); ?>" title="Go Home"><img src="<?php echo get_option_tree( 'logo' ) ?>" alt="logo" /></a>
       
   223 						<?php } 							
       
   224 					?>  
       
   225 			</div><!-- end logo -->
       
   226 		
       
   227 			 <!-- koda za menu -->
       
   228 			<ul class="menu" id="main-menu">
       
   229 				<?php
       
   230             $page_args = array('sort_order' => 'ASC', 'sort_column' => 'menu_order');
       
   231             $pages = get_pages($page_args); 
       
   232             $menu_items=1;
       
   233             foreach ($pages as $single_page) {
       
   234             		$trenutni="";
       
   235             		//if(($menu_items==1)&&(!is_single())){ $trenutni=" current";}
       
   236             		
       
   237             		$pageTemplate= get_post_meta($single_page->ID , 'page_template' , true);
       
   238             		if(($pageTemplate=='Blog')&&(is_single())){ $trenutni="class='current'";}	 
       
   239             		
       
   240             	   $pageInMenu= get_post_meta($single_page->ID, 'show_page_in_menu' , true);
       
   241 				  
       
   242             	   $url_tab = "#"; 
       
   243             	   if (!is_front_page()){
       
   244             	   	 $url_tab = get_option("siteurl")."#";
       
   245             	   }
       
   246             	   $menu_items++;
       
   247             		if ($pageInMenu == 'Yes') {						
       
   248 							echo '<li '.$trenutni.'><a class="boxes" href="' . $url_tab . $single_page->post_name . '">' . $single_page->post_title . '</a></li> ';						
       
   249                   }                 
       
   250             }
       
   251             ?>  
       
   252 			</ul>						
       
   253 			<!-- start social icons -->
       
   254 			<?php
       
   255 			$socials='';
       
   256 			if ( function_exists( 'get_option_tree' ) ) {
       
   257     		    		  if (get_option_tree( 'social_icons')) {
       
   258     		    				$socials= get_option_tree( 'social_icons', $option_tree, false, true, -1 );
       
   259     		    				$img_num = 1;
       
   260     		    				if(!empty($socials)){ ?>
       
   261 								<ul class="tt-wrapper">								
       
   262 								<?php
       
   263 								foreach( $socials as $social ) {
       
   264 									echo '<li><a href="'.$social['link'].'" target="_blank" title="'.$social['title'].'" style="background: transparent url('.$social['image'].') no-repeat top left;"><span>'.$social['title'].'</span></a></li>';
       
   265 								}
       
   266 								echo '</ul>';
       
   267 					} } }					
       
   268 			?>	
       
   269 		
       
   270 		</div><!-- end left-sidebar -->
       
   271 		
       
   272 		<div id="container"><!-- start container -->